Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Functions New in QuickTime 4

This section contains functions introduced in QuickTime 4. In addition to explanations in this section, you can find more information in "New Features of Graphics Importer Components" .


GraphicsImportGetImageCount

Returns the number of images in the image file.

pascal ComponentResult GraphicsImportGetImageCount (GraphicsImportComponent ci,
                     unsigned long *imageCount);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
imageCount
Points to a variable to receive the number of images.

DISCUSSION

Most image file formats don't support multiple images. Of the image formats supported by QuickTime 4, however, TIFF files can support multiple images, Photoshop files can contain multiple layers and FlashPix files can contain multiple resolutions.

The base graphics importer returns a count of 1. Format-specific importers for multiple-image formats should override this function; other importers should delegate it.


GraphicsImportSetImageIndex

Specifies the image index.

pascal ComponentResult GraphicsImportSetImageIndex (GraphicsImportComponent ci,
                     unsigned long imageIndex);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
imageIndex
Specifies the image index.

DISCUSSION

The default image index is 1. Image indexes are one-based; zero is considered a special index by some importers, and treated the same as one by others.

The base graphics importer implements this function. Format-specific importers should delegate it. The base graphics importer ensures that the image index is no greater than the image count returned by GraphicsImportGetImageCount .


GraphicsImportGetImageIndex

Returns the current image index.

pascal ComponentResult GraphicsImportGetImageIndex (GraphicsImportComponent ci,
                     unsigned long *imageIndex);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
imageIndex
Points to a variable to receive the image index.

DISCUSSION

The base graphics importer implements this function. Format-specific importers should delegate it.


GraphicsImportGetDataOffsetAndSize64

Returns the location of the compressed data segment within the data reference.

pascal ComponentResult GraphicsImportGetDataOffsetAndSize64 ( GraphicsImportComponent ci,
                     wide *offset,
                     wide *size);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
offset
A pointer to a value describing the byte offset of the image data.
size
A pointer to the size of the data, in bytes.

DISCUSSION

This is a 64-bit analog of GraphicsImportGetDataOffsetAndSize .

Format-specific importers may delegate this function, in which case the base importer's implementation will call the 32-bit equivalent, GraphicsImportGetDataOffsetAndSize . If neither function is implemented by the format-specific importer, then both functions will return offset zero and the full size of the data reference (taking into account any data reference offset and limit).


GraphicsImportReadData64

Reads image data.

pascal ComponentResult GraphicsImportReadData64 (
                     GraphicsImportComponent ci,
                     void *dataPtr,
                     const wide *dataOffset,
                     unsigned long dataSize);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
dataPtr
A pointer to a memory block to receive the data.
dataOffset
A pointer to the offset of the image data within the data reference.
dataSize
The number of bytes of image data to read.

DISCUSSION

This is a 64-bit analog of GraphicsImportReadData . Format-specific importers may call either version.


GraphicsImportSetDataReferenceOffsetAndLimit64

Specifies the location of the compressed data segment within the data reference.

pascal ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit64 (GraphicsImportComponent
                     ci,
                     const wide *offset,
                     const wide *limit);

offset
A pointer to a value specifying the byte offset of the image data from the beginning of the data source.
limit
A pointer to a value specifying the offset of the byte following the last byte of the image data.

DISCUSSION

This is a 64-bit analog of GraphicsImportSetDataReferenceOffsetAndLimit .


GraphicsImportGetDataReferenceOffsetAndLimit64

Returns the location of the compressed data segment within the data reference.

pascal ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit64 (
                     GraphicsImportComponent ci,
                     wide *offset,
                     wide *limit);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
offset
A pointer to receive a value specifying the offset of the byte data following the last byte of the image data.
limit
A pointer to the data limit.

DISCUSSION

This is a 64-bit analog of GraphicsImportGetDataReferenceOffsetAndLimit .
 

GraphicsImportGetDefaultMatrix

Returns the default matrix, if one is stored in the image.

pascal ComponentResult GraphicsImportGetDefaultMatrix (GraphicsImportComponent ci,
                     MatrixRecord *defaultMatrix);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
defaultMatrix Receives a matrix record.
 

DISCUSSION

Most graphics importers do not implement this function. If this function returns badComponentSelector , you should assume an identity matrix.


GraphicsImportGetDefaultClip

Returns the default clipping region, if one is stored in the image.

pascal ComponentResult GraphicsImportGetDefaultClip ( GraphicsImportComponent ci,
                     RgnHandle *defaultRgn);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
defaultRgn
Receives a default clip.

DISCUSSION

Most graphics importers do not implement this function. If this function returns badComponentSelector , you should assume no clipping. The caller is responsible for disposing of the returned region.


GraphicsImportGetDefaultGraphicsMode

Returns the default graphics mode, if one is stored in the image.

pascal ComponentResult GraphicsImportGetDefaultGraphicsMode ( GraphicsImportComponent ci,
                     long *defaultGraphicsMode,
                     RGBColor *defaultOpColor);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
defaultGraphicsMode
Receives the graphics mode.
defaultOpColor
Receives a color.

DISCUSSION

Most graphics importers do not implement this function. If this function returns badComponentSelector , you should assume a mode of ditherCopy .


GraphicsImportGetDefaultSourceRect

Returns the default source rect, if one is stored in the image.

pascal ComponentResult GraphicsImportGetDefaultSourceRect ( GraphicsImportComponent ci,
                     Rect *defaultSourceRect);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
defaultSourceRect
Receives a rectangle.

DISCUSSION

Most graphics importers do not implement this function. If this function returns badComponentSelector , you should assume a source rect equal to the natural bounds.


GraphicsImportGetColorSyncProfile

Returns a ColorSync profile, if one is embedded in the image file.

pascal ComponentResult GraphicsImportGetColorSyncProfile ( GraphicsImportComponent ci,
                     Handle *profile);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
profile
A pointer to receive a handle containing a ColorSync profile, or nil if the image file does not contain one.

DISCUSSION

Some graphics importers do not implement this function. The caller is responsible for disposing of the returned handle.


GraphicsImportSetDestRect

Sets the destination rectangle.

pascal ComponentResult GraphicsImportSetDestRect (
                     GraphicsImportComponent ci,
                     const Rect *destRect);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
destRect
Points to a rectangle structure.

DISCUSSION

You can use this function to define the rectangle into which the extracted source rectangle should be drawn. This function creates a transformation matrix to map the source rectangle to the specified destination rectangle and then calls the GraphicsImportSetMatrix function.

If the source rectangle is equal to the natural bounds, this function is equivalent to GraphicsImportSetBoundsRect . For more information on the relationship between rectangles and transformation matrix, see "Getting/Setting the Destination Rectangle" .


GraphicsImportGetDestRect

Returns the destination rectangle.

pascal ComponentResult GraphicsImportGetDestRect (
                     GraphicsImportComponent ci,
                     Rect *destRect);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
destRect
Receives the destination rectangle.

DISCUSSION

If the source rectangle is equal to the natural bounds, this function is equivalent to GetBoundsRect .


GraphicsImportSetFlags

Sets flags.

pascal ComponentResult GraphicsImportSetFlags (
                     GraphicsImportComponent ci,
                     long flags);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
flags
Specifies the new flags to use.

GraphicsImportGetFlags

Returns the current flags.

pascal ComponentResult GraphicsImportGetFlags (
                     GraphicsImportComponent ci,
                     long *flags);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
flags
Receives the current flags.

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |